<div class="empresas view">
<h2><?php  __('Empresa');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $empresa['Empresa']['id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $empresa['Empresa']['name']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Site Oficial'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $empresa['Empresa']['site_oficial']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Data Fundacao'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $empresa['Empresa']['data_fundacao']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Endereco Principal'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $empresa['Empresa']['endereco_principal']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Distrito'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $this->Html->link($empresa['Distrito']['name'], array('controller' => 'distritos', 'action' => 'view', $empresa['Distrito']['id'])); ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Provincia'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $this->Html->link($empresa['Provincia']['name'], array('controller' => 'provincias', 'action' => 'view', $empresa['Provincia']['id'])); ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Empresa', true), array('action' => 'edit', $empresa['Empresa']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Delete Empresa', true), array('action' => 'delete', $empresa['Empresa']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $empresa['Empresa']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Empresas', true), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Empresa', true), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Distritos', true), array('controller' => 'distritos', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Distrito', true), array('controller' => 'distritos', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Provincias', true), array('controller' => 'provincias', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Provincia', true), array('controller' => 'provincias', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Areas', true), array('controller' => 'areas', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Area', true), array('controller' => 'areas', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Entidades', true), array('controller' => 'entidades', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Entidade', true), array('controller' => 'entidades', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Related Areas');?></h3>
	<?php if (!empty($empresa['Area'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __(' Name'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($empresa['Area'] as $area):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $area['id'];?></td>
			<td><?php echo $area[' name'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'areas', 'action' => 'view', $area['id'])); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'areas', 'action' => 'edit', $area['id'])); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'areas', 'action' => 'delete', $area['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $area['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Area', true), array('controller' => 'areas', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related Distritos');?></h3>
	<?php if (!empty($empresa['Distrito'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Name'); ?></th>
		<th><?php __('Provincia Id'); ?></th>
		<th><?php __('Paise Id'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($empresa['Distrito'] as $distrito):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $distrito['id'];?></td>
			<td><?php echo $distrito['name'];?></td>
			<td><?php echo $distrito['provincia_id'];?></td>
			<td><?php echo $distrito['paise_id'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'distritos', 'action' => 'view', $distrito['id'])); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'distritos', 'action' => 'edit', $distrito['id'])); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'distritos', 'action' => 'delete', $distrito['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $distrito['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Distrito', true), array('controller' => 'distritos', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related Entidades');?></h3>
	<?php if (!empty($empresa['Entidade'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Name'); ?></th>
		<th><?php __('Data Nascimento'); ?></th>
		<th><?php __('Genero Id'); ?></th>
		<th><?php __('Email'); ?></th>
		<th><?php __('Nacionalidade'); ?></th>
		<th><?php __('Morada'); ?></th>
		<th><?php __('Provincia Id'); ?></th>
		<th><?php __('Distrito Id'); ?></th>
		<th><?php __('Telefone'); ?></th>
		<th><?php __('Telemovel'); ?></th>
		<th><?php __('Grau Academico Id'); ?></th>
		<th><?php __('User Id'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($empresa['Entidade'] as $entidade):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $entidade['id'];?></td>
			<td><?php echo $entidade['name'];?></td>
			<td><?php echo $entidade['data_nascimento'];?></td>
			<td><?php echo $entidade['genero_id'];?></td>
			<td><?php echo $entidade['email'];?></td>
			<td><?php echo $entidade['nacionalidade'];?></td>
			<td><?php echo $entidade['morada'];?></td>
			<td><?php echo $entidade['provincia_id'];?></td>
			<td><?php echo $entidade['distrito_id'];?></td>
			<td><?php echo $entidade['telefone'];?></td>
			<td><?php echo $entidade['telemovel'];?></td>
			<td><?php echo $entidade['grau_academico_id'];?></td>
			<td><?php echo $entidade['user_id'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'entidades', 'action' => 'view', $entidade['id'])); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'entidades', 'action' => 'edit', $entidade['id'])); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'entidades', 'action' => 'delete', $entidade['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $entidade['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Entidade', true), array('controller' => 'entidades', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
